<?php

use yii\db\Migration;

class m161022_062919_create_log extends Migration
{
    public function up()
    {
        $this->createTable('kd_log',
            [
                'rz_id'=>$this->primaryKey()->comment('日志ID'),
                'rz_shijian'=>$this->string(200)->notNull()->comment('日志内容'),
                'rz_caozuoren'=>$this->string(50)->notNull()->comment('操作人'),
                'rz_datetime'=>$this->Datetime()->notNull()->comment('事件日期'),
            ]);
    }

    public function down()
    {
       $this->dropTable('kd_log');
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
